﻿/* main.c */

#include "util.h"

int main(){
	char *text = read_file(FILENAME);

	char title[100] = {0};
	char *p = strchr(text, '>');
	snprintf(title, (p - text) + 2, "%s", text); //这里要多留一个位置，给最后的'/0'
	Node *root = create_tree(p);
	
	printf("%s\n", root->child->next->next->child->tag);
	printf("%s\n", root->child->next->next->child->context);

	destroy_tree(&root);

	return 0;
}
